<template>
  <div class="banners">
    <swiper :options="swiperOption">
      <swiper-slide v-for="(item,index) in data" :key="index">
        <img :src="item.img">
      </swiper-slide>
        <div class="swiper-pagination" slot="pagination"></div>
    </swiper>
  </div>
</template>

<script>


export default {
  name: 'Banners',
  data(){
    return{
      swiperOption: {
        pagination: {
          el: '.swiper-pagination'
        },
        autoplay: true,
        loop: true
      }
    }
  },
  props:{
    data:{
      type:Array,
      default:function(){
        return [];
      }
    }
  }
}
</script>

<style scoped>
.banners{
  font-size: 0.1rem;
}
.banners img{
  width: 100%;
  height: 1.63rem;
}
.banners .swiper-pagination-bullets .swiper-pagination-bullet-active{
  background-color: #109d59;
}
</style>